function Runway(name, start, end){
  this.map;
  this.name = name;
  this.startPoint = start;
  this.endPoint = end;
  
  this.drawRunway = function(){
    startPoint = new OpenLayers.Geometry.Point(this.startPoint.lon, this.startPoint.lat);
    endPoint = new OpenLayers.Geometry.Point(this.endPoint.lon, this.endPoint.lat);
    feature = new OpenLayers.Feature.Vector(
      new OpenLayers.Geometry.LineString([startPoint, endPoint]));
    layers = this.map.getLayersByClass("Simple Geometry");
    for(var i = 0; i < layers.length; i++){
      layers[i].addFeatures([feature]);
    }
  }
  
  this.calculateCircle = function(point, abArray){    
    var x1, x2, y1, y2;
    x1 = this.startPoint.lon;
    y1 = this.startPoint.lat;
    x2 = this.endPoint.lon;
    y2 = this.endPoint.lat;
    
    var a, b;
    a = (y2 - y1) / (x2 - x1);
    //b = (y2 * x1 - y1) / (x1 - 1);
    b = y1 - a * x1;
    
    var aS = - 1 / a;
    var bS = y2 - aS * x2;
    
    x1 = this.endPoint.lon;
    y1 = this.endPoint.lat;
    
    x2 = point.lon;
    y2 = point.lat;
    
    var x = (Math.pow(x2, 2) - 2*bS*y2 + Math.pow(y2, 2) - Math.pow(x1, 2) + 2*bS*y1 - Math.pow(y1, 2)) / (2*x2 - 2*x1 - (2*y2 / aS) + (2*y1 / aS));
    var y = x*aS + bS;
    
    var r = Math.pow(Math.pow(x2 - x, 2) + Math.pow(y2 - y, 2), 1/2);
    return r; 
  }
  
  this.drawRunway();
}
